package com.qtcm.nas.cxm.yuangong.service.impl;

import com.qtcm.nas.cxm.yuangong.dao.IEmployeeDao;
import com.qtcm.nas.cxm.yuangong.pojo.Employee;
import com.qtcm.nas.cxm.yuangong.pojo.YeJi;
import com.qtcm.nas.cxm.yuangong.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class EmployeeService implements IEmployeeService {
    @Autowired
    @Qualifier("employeeDao")
    private IEmployeeDao employeeDao;
    @Override
    public void addEmployee(Employee employee) {
        employeeDao.addEmployee(employee);
    }

    @Override
    public List<Employee> findAllPage(Integer pageNum, Integer pageSize) {
        return employeeDao.findAllPage(pageNum, pageSize);
    }

    @Override
    public List<Employee> findAll() {
        return employeeDao.findAll();
    }

    @Override
    public List<Employee> findZz() {
        return employeeDao.findZz();
    }

    @Override
    public List<Employee> findLz() {
        return employeeDao.findLz();
    }

    @Override
    public Employee findById(int eid) {
        return employeeDao.findById(eid);
    }

    @Override
    public void updateEmployee(Employee employee) {
        employeeDao.updateEmployee(employee);
    }

    @Override
    public YeJi findFu(int eid) {
        return employeeDao.findFu(eid);
    }
//
//    @Override
//    public List<YeJi> findOrders() {
//        return employeeDao.findOrders();
//    }

    @Override
    public List<YeJi> findOrders(String firstDate, String lastDate) {
        return employeeDao.findOrders(firstDate, lastDate);
    }
}
